1. Field of the Invention
The present invention relates to the computer field, particularly to application high availability, and more particularly to a method and apparatus for realizing application high availability.
2. Description of Related Art
Application high availability (HA) refers to the ability of an application to provide access to users continuously and uninterruptedly. It is critical for enterprises.
FIG. 1 schematically illustrates a current solution for realizing application high availability, wherein a same application is installed on a first server and a second server respectively, the first server used as an active server, the second server as a passive server. A file management mechanism for HA specific to the application is included in (or associated with) the application, which mechanism is for monitoring access operations on disk files during the execution of the application, and for replicating modifications of disk files by the application to the passive server or a shared storage between the current server and the passive server.
An HA manager is installed in a third server coupled with the first server and the second server for: monitoring the execution status of the application on the current server, for initiating the application on the passive server when the application fails, and for switching the IP address of the application onto the passive sever. The HA manager could also be directly installed in the first server and the second server. In such a solution, only the file management mechanism for HA specific to the application included in the application knows the file structure of the application and its access operations, and is able to perform replication of updated files, while the HA manager does not know the file structure of the application.
In the current technology, different applications have their own HA mechanisms, and there is no general HA mechanism. For example, the large database software DB2 may configure the data repository in a particular directory for HA, and the Websphere Application Server (WAS) may configure the transaction log in a particular directory for HA. As another example, IBM's Tivoli System Automation (TSA), Veritas Cluster is actually a script execution framework with policy support, and provides HA automation for specific applications. Such HA mechanisms, however, cannot be applied in general applications because different applications access different files during their execution, and have different file directory structures; and the files accessed by an application during its execution are usually distributed in multiple places within and outside the installation directory of the application.
For example, Apache has the different paths for configurations and data as follows: /etc/apache2—httpd configuration (unchangeable); /etc/sysconfig/apache2—containing configuration files; /usr/share/apache2—all data related to apache. Therefore, there is no general HA mechanism in the current technology which can replicate the files updated during the execution of different applications to a passive server.
Such a current solution requires application designers to have high designing skills and to make great effort to design the HA mechanism, and application developers to have high developing skills and make great effort to implement the HA mechanism, as well as application users to understand application specific implementations and make great effort to configure the applications correctly.